import request from '@/config/axios'

// 职工学历 VO
export interface EmployeeEducationsVO {
  id: number // 主键ID
  empId: number // 职工ID
  education: string // 学历
  degree: string // 学位
  studyMode: string // 学习形式
  school: string // 学校
  major: string // 专业
}

// 职工学历 API
export const EmployeeEducationsApi = {
  // 查询职工学历分页
  getEmployeeEducationsPage: async (params: any) => {
    return await request.get({ url: `/pm/employee-educations/page`, params })
  },

  // 查询职工学历详情
  getEmployeeEducations: async (id: number) => {
    return await request.get({ url: `/pm/employee-educations/get?id=` + id })
  },

  // 新增职工学历
  createEmployeeEducations: async (data: EmployeeEducationsVO) => {
    return await request.post({ url: `/pm/employee-educations/create`, data })
  },

  // 修改职工学历
  updateEmployeeEducations: async (data: EmployeeEducationsVO) => {
    return await request.put({ url: `/pm/employee-educations/update`, data })
  },

  // 删除职工学历
  deleteEmployeeEducations: async (id: number) => {
    return await request.delete({ url: `/pm/employee-educations/delete?id=` + id })
  },

  // 导出职工学历 Excel
  exportEmployeeEducations: async (params) => {
    return await request.download({ url: `/pm/employee-educations/export-excel`, params })
  },
}